/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.comfacauca.xmlc2.entidades.glpi;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author eorozco
 */
@Entity
@Table(name = "glpi_users")
@NamedQueries({
    @NamedQuery(name = "GlpiUsers.findAll", query = "SELECT g FROM GlpiUsers g"),
    @NamedQuery(name = "GlpiUsers.findById", query = "SELECT g FROM GlpiUsers g WHERE g.id = :id"),
    @NamedQuery(name = "GlpiUsers.findByName", query = "SELECT g FROM GlpiUsers g WHERE g.name = :name"),
    @NamedQuery(name = "GlpiUsers.findByPassword", query = "SELECT g FROM GlpiUsers g WHERE g.password = :password"),
    @NamedQuery(name = "GlpiUsers.findByPhone", query = "SELECT g FROM GlpiUsers g WHERE g.phone = :phone"),
    @NamedQuery(name = "GlpiUsers.findByPhone2", query = "SELECT g FROM GlpiUsers g WHERE g.phone2 = :phone2"),
    @NamedQuery(name = "GlpiUsers.findByMobile", query = "SELECT g FROM GlpiUsers g WHERE g.mobile = :mobile"),
    @NamedQuery(name = "GlpiUsers.findByRealname", query = "SELECT g FROM GlpiUsers g WHERE g.realname = :realname"),
    @NamedQuery(name = "GlpiUsers.findByFirstname", query = "SELECT g FROM GlpiUsers g WHERE g.firstname = :firstname"),
    @NamedQuery(name = "GlpiUsers.findByLocationsId", query = "SELECT g FROM GlpiUsers g WHERE g.locationsId = :locationsId"),
    @NamedQuery(name = "GlpiUsers.findByLanguage", query = "SELECT g FROM GlpiUsers g WHERE g.language = :language"),
    @NamedQuery(name = "GlpiUsers.findByUseMode", query = "SELECT g FROM GlpiUsers g WHERE g.useMode = :useMode"),
    @NamedQuery(name = "GlpiUsers.findByListLimit", query = "SELECT g FROM GlpiUsers g WHERE g.listLimit = :listLimit"),
    @NamedQuery(name = "GlpiUsers.findByIsActive", query = "SELECT g FROM GlpiUsers g WHERE g.isActive = :isActive"),
    @NamedQuery(name = "GlpiUsers.findByAuthsId", query = "SELECT g FROM GlpiUsers g WHERE g.authsId = :authsId"),
    @NamedQuery(name = "GlpiUsers.findByAuthtype", query = "SELECT g FROM GlpiUsers g WHERE g.authtype = :authtype"),
    @NamedQuery(name = "GlpiUsers.findByLastLogin", query = "SELECT g FROM GlpiUsers g WHERE g.lastLogin = :lastLogin"),
    @NamedQuery(name = "GlpiUsers.findByDateMod", query = "SELECT g FROM GlpiUsers g WHERE g.dateMod = :dateMod"),
    @NamedQuery(name = "GlpiUsers.findByDateSync", query = "SELECT g FROM GlpiUsers g WHERE g.dateSync = :dateSync"),
    @NamedQuery(name = "GlpiUsers.findByIsDeleted", query = "SELECT g FROM GlpiUsers g WHERE g.isDeleted = :isDeleted"),
    @NamedQuery(name = "GlpiUsers.findByProfilesId", query = "SELECT g FROM GlpiUsers g WHERE g.profilesId = :profilesId"),
    @NamedQuery(name = "GlpiUsers.findByEntitiesId", query = "SELECT g FROM GlpiUsers g WHERE g.entitiesId = :entitiesId"),
    @NamedQuery(name = "GlpiUsers.findByUsertitlesId", query = "SELECT g FROM GlpiUsers g WHERE g.usertitlesId = :usertitlesId"),
    @NamedQuery(name = "GlpiUsers.findByUsercategoriesId", query = "SELECT g FROM GlpiUsers g WHERE g.usercategoriesId = :usercategoriesId"),
    @NamedQuery(name = "GlpiUsers.findByDateFormat", query = "SELECT g FROM GlpiUsers g WHERE g.dateFormat = :dateFormat"),
    @NamedQuery(name = "GlpiUsers.findByNumberFormat", query = "SELECT g FROM GlpiUsers g WHERE g.numberFormat = :numberFormat"),
    @NamedQuery(name = "GlpiUsers.findByNamesFormat", query = "SELECT g FROM GlpiUsers g WHERE g.namesFormat = :namesFormat"),
    @NamedQuery(name = "GlpiUsers.findByCsvDelimiter", query = "SELECT g FROM GlpiUsers g WHERE g.csvDelimiter = :csvDelimiter"),
    @NamedQuery(name = "GlpiUsers.findByIsIdsVisible", query = "SELECT g FROM GlpiUsers g WHERE g.isIdsVisible = :isIdsVisible"),
    @NamedQuery(name = "GlpiUsers.findByDropdownCharsLimit", query = "SELECT g FROM GlpiUsers g WHERE g.dropdownCharsLimit = :dropdownCharsLimit"),
    @NamedQuery(name = "GlpiUsers.findByUseFlatDropdowntree", query = "SELECT g FROM GlpiUsers g WHERE g.useFlatDropdowntree = :useFlatDropdowntree"),
    @NamedQuery(name = "GlpiUsers.findByShowJobsAtLogin", query = "SELECT g FROM GlpiUsers g WHERE g.showJobsAtLogin = :showJobsAtLogin"),
    @NamedQuery(name = "GlpiUsers.findByPriority1", query = "SELECT g FROM GlpiUsers g WHERE g.priority1 = :priority1"),
    @NamedQuery(name = "GlpiUsers.findByPriority2", query = "SELECT g FROM GlpiUsers g WHERE g.priority2 = :priority2"),
    @NamedQuery(name = "GlpiUsers.findByPriority3", query = "SELECT g FROM GlpiUsers g WHERE g.priority3 = :priority3"),
    @NamedQuery(name = "GlpiUsers.findByPriority4", query = "SELECT g FROM GlpiUsers g WHERE g.priority4 = :priority4"),
    @NamedQuery(name = "GlpiUsers.findByPriority5", query = "SELECT g FROM GlpiUsers g WHERE g.priority5 = :priority5"),
    @NamedQuery(name = "GlpiUsers.findByPriority6", query = "SELECT g FROM GlpiUsers g WHERE g.priority6 = :priority6"),
    @NamedQuery(name = "GlpiUsers.findByIsCategorizedSoftExpanded", query = "SELECT g FROM GlpiUsers g WHERE g.isCategorizedSoftExpanded = :isCategorizedSoftExpanded"),
    @NamedQuery(name = "GlpiUsers.findByIsNotCategorizedSoftExpanded", query = "SELECT g FROM GlpiUsers g WHERE g.isNotCategorizedSoftExpanded = :isNotCategorizedSoftExpanded"),
    @NamedQuery(name = "GlpiUsers.findByFollowupPrivate", query = "SELECT g FROM GlpiUsers g WHERE g.followupPrivate = :followupPrivate"),
    @NamedQuery(name = "GlpiUsers.findByTaskPrivate", query = "SELECT g FROM GlpiUsers g WHERE g.taskPrivate = :taskPrivate"),
    @NamedQuery(name = "GlpiUsers.findByDefaultRequesttypesId", query = "SELECT g FROM GlpiUsers g WHERE g.defaultRequesttypesId = :defaultRequesttypesId"),
    @NamedQuery(name = "GlpiUsers.findByPasswordForgetToken", query = "SELECT g FROM GlpiUsers g WHERE g.passwordForgetToken = :passwordForgetToken"),
    @NamedQuery(name = "GlpiUsers.findByPasswordForgetTokenDate", query = "SELECT g FROM GlpiUsers g WHERE g.passwordForgetTokenDate = :passwordForgetTokenDate"),
    @NamedQuery(name = "GlpiUsers.findByRegistrationNumber", query = "SELECT g FROM GlpiUsers g WHERE g.registrationNumber = :registrationNumber"),
    @NamedQuery(name = "GlpiUsers.findByShowCountOnTabs", query = "SELECT g FROM GlpiUsers g WHERE g.showCountOnTabs = :showCountOnTabs"),
    @NamedQuery(name = "GlpiUsers.findByRefreshTicketList", query = "SELECT g FROM GlpiUsers g WHERE g.refreshTicketList = :refreshTicketList"),
    @NamedQuery(name = "GlpiUsers.findBySetDefaultTech", query = "SELECT g FROM GlpiUsers g WHERE g.setDefaultTech = :setDefaultTech"),
    @NamedQuery(name = "GlpiUsers.findByPersonalToken", query = "SELECT g FROM GlpiUsers g WHERE g.personalToken = :personalToken"),
    @NamedQuery(name = "GlpiUsers.findByPersonalTokenDate", query = "SELECT g FROM GlpiUsers g WHERE g.personalTokenDate = :personalTokenDate"),
    @NamedQuery(name = "GlpiUsers.findByDisplayCountOnHome", query = "SELECT g FROM GlpiUsers g WHERE g.displayCountOnHome = :displayCountOnHome")})
public class GlpiUsers implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Size(max = 255)
    @Column(name = "name")
    private String name;
    @Size(max = 80)
    @Column(name = "password")
    private String password;
    // @Pattern(regexp="^\\(?(\\d{3})\\)?[- ]?(\\d{3})[- ]?(\\d{4})$", message="Formato tel./fax. invalido, debe ser xxx-xxx-xxxx")//if the field contains phone or fax number consider using this annotation to enforce field validation
    @Size(max = 255)
    @Column(name = "phone")
    private String phone;
    @Size(max = 255)
    @Column(name = "phone2")
    private String phone2;
    @Size(max = 255)
    @Column(name = "mobile")
    private String mobile;
    @Size(max = 255)
    @Column(name = "realname")
    private String realname;
    @Size(max = 255)
    @Column(name = "firstname")
    private String firstname;
    @Basic(optional = false)
    @NotNull
    @Column(name = "locations_id")
    private int locationsId;
    @Size(max = 10)
    @Column(name = "language")
    private String language;
    @Basic(optional = false)
    @NotNull
    @Column(name = "use_mode")
    private int useMode;
    @Column(name = "list_limit")
    private Integer listLimit;
    @Basic(optional = false)
    @NotNull
    @Column(name = "is_active")
    private boolean isActive;
    @Lob
    @Size(max = 65535)
    @Column(name = "comment")
    private String comment;
    @Basic(optional = false)
    @NotNull
    @Column(name = "auths_id")
    private int authsId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "authtype")
    private int authtype;
    @Column(name = "last_login")
    @Temporal(TemporalType.TIMESTAMP)
    private Date lastLogin;
    @Column(name = "date_mod")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dateMod;
    @Column(name = "date_sync")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dateSync;
    @Basic(optional = false)
    @NotNull
    @Column(name = "is_deleted")
    private boolean isDeleted;
    @Basic(optional = false)
    @NotNull
    @Column(name = "profiles_id")
    private int profilesId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "entities_id")
    private int entitiesId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "usertitles_id")
    private int usertitlesId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "usercategories_id")
    private int usercategoriesId;
    @Column(name = "date_format")
    private Integer dateFormat;
    @Column(name = "number_format")
    private Integer numberFormat;
    @Column(name = "names_format")
    private Integer namesFormat;
    @Column(name = "csv_delimiter")
    private Character csvDelimiter;
    @Column(name = "is_ids_visible")
    private Boolean isIdsVisible;
    @Column(name = "dropdown_chars_limit")
    private Integer dropdownCharsLimit;
    @Column(name = "use_flat_dropdowntree")
    private Boolean useFlatDropdowntree;
    @Column(name = "show_jobs_at_login")
    private Boolean showJobsAtLogin;
    @Size(max = 20)
    @Column(name = "priority_1")
    private String priority1;
    @Size(max = 20)
    @Column(name = "priority_2")
    private String priority2;
    @Size(max = 20)
    @Column(name = "priority_3")
    private String priority3;
    @Size(max = 20)
    @Column(name = "priority_4")
    private String priority4;
    @Size(max = 20)
    @Column(name = "priority_5")
    private String priority5;
    @Size(max = 20)
    @Column(name = "priority_6")
    private String priority6;
    @Column(name = "is_categorized_soft_expanded")
    private Boolean isCategorizedSoftExpanded;
    @Column(name = "is_not_categorized_soft_expanded")
    private Boolean isNotCategorizedSoftExpanded;
    @Column(name = "followup_private")
    private Boolean followupPrivate;
    @Column(name = "task_private")
    private Boolean taskPrivate;
    @Column(name = "default_requesttypes_id")
    private Integer defaultRequesttypesId;
    @Size(max = 40)
    @Column(name = "password_forget_token")
    private String passwordForgetToken;
    @Column(name = "password_forget_token_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date passwordForgetTokenDate;
    @Lob
    @Size(max = 65535)
    @Column(name = "user_dn")
    private String userDn;
    @Size(max = 255)
    @Column(name = "registration_number")
    private String registrationNumber;
    @Column(name = "show_count_on_tabs")
    private Boolean showCountOnTabs;
    @Column(name = "refresh_ticket_list")
    private Integer refreshTicketList;
    @Column(name = "set_default_tech")
    private Boolean setDefaultTech;
    @Size(max = 255)
    @Column(name = "personal_token")
    private String personalToken;
    @Column(name = "personal_token_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date personalTokenDate;
    @Column(name = "display_count_on_home")
    private Integer displayCountOnHome;

    public GlpiUsers() {
    }

    public GlpiUsers(Integer id) {
        this.id = id;
    }

    public GlpiUsers(Integer id, int locationsId, int useMode, boolean isActive, int authsId, int authtype, boolean isDeleted, int profilesId, int entitiesId, int usertitlesId, int usercategoriesId) {
        this.id = id;
        this.locationsId = locationsId;
        this.useMode = useMode;
        this.isActive = isActive;
        this.authsId = authsId;
        this.authtype = authtype;
        this.isDeleted = isDeleted;
        this.profilesId = profilesId;
        this.entitiesId = entitiesId;
        this.usertitlesId = usertitlesId;
        this.usercategoriesId = usercategoriesId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhone2() {
        return phone2;
    }

    public void setPhone2(String phone2) {
        this.phone2 = phone2;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getFirstname() {
        return firstname;
    }

    public void setFirstname(String firstname) {
        this.firstname = firstname;
    }

    public int getLocationsId() {
        return locationsId;
    }

    public void setLocationsId(int locationsId) {
        this.locationsId = locationsId;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public int getUseMode() {
        return useMode;
    }

    public void setUseMode(int useMode) {
        this.useMode = useMode;
    }

    public Integer getListLimit() {
        return listLimit;
    }

    public void setListLimit(Integer listLimit) {
        this.listLimit = listLimit;
    }

    public boolean getIsActive() {
        return isActive;
    }

    public void setIsActive(boolean isActive) {
        this.isActive = isActive;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public int getAuthsId() {
        return authsId;
    }

    public void setAuthsId(int authsId) {
        this.authsId = authsId;
    }

    public int getAuthtype() {
        return authtype;
    }

    public void setAuthtype(int authtype) {
        this.authtype = authtype;
    }

    public Date getLastLogin() {
        return lastLogin;
    }

    public void setLastLogin(Date lastLogin) {
        this.lastLogin = lastLogin;
    }

    public Date getDateMod() {
        return dateMod;
    }

    public void setDateMod(Date dateMod) {
        this.dateMod = dateMod;
    }

    public Date getDateSync() {
        return dateSync;
    }

    public void setDateSync(Date dateSync) {
        this.dateSync = dateSync;
    }

    public boolean getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    public int getProfilesId() {
        return profilesId;
    }

    public void setProfilesId(int profilesId) {
        this.profilesId = profilesId;
    }

    public int getEntitiesId() {
        return entitiesId;
    }

    public void setEntitiesId(int entitiesId) {
        this.entitiesId = entitiesId;
    }

    public int getUsertitlesId() {
        return usertitlesId;
    }

    public void setUsertitlesId(int usertitlesId) {
        this.usertitlesId = usertitlesId;
    }

    public int getUsercategoriesId() {
        return usercategoriesId;
    }

    public void setUsercategoriesId(int usercategoriesId) {
        this.usercategoriesId = usercategoriesId;
    }

    public Integer getDateFormat() {
        return dateFormat;
    }

    public void setDateFormat(Integer dateFormat) {
        this.dateFormat = dateFormat;
    }

    public Integer getNumberFormat() {
        return numberFormat;
    }

    public void setNumberFormat(Integer numberFormat) {
        this.numberFormat = numberFormat;
    }

    public Integer getNamesFormat() {
        return namesFormat;
    }

    public void setNamesFormat(Integer namesFormat) {
        this.namesFormat = namesFormat;
    }

    public Character getCsvDelimiter() {
        return csvDelimiter;
    }

    public void setCsvDelimiter(Character csvDelimiter) {
        this.csvDelimiter = csvDelimiter;
    }

    public Boolean getIsIdsVisible() {
        return isIdsVisible;
    }

    public void setIsIdsVisible(Boolean isIdsVisible) {
        this.isIdsVisible = isIdsVisible;
    }

    public Integer getDropdownCharsLimit() {
        return dropdownCharsLimit;
    }

    public void setDropdownCharsLimit(Integer dropdownCharsLimit) {
        this.dropdownCharsLimit = dropdownCharsLimit;
    }

    public Boolean getUseFlatDropdowntree() {
        return useFlatDropdowntree;
    }

    public void setUseFlatDropdowntree(Boolean useFlatDropdowntree) {
        this.useFlatDropdowntree = useFlatDropdowntree;
    }

    public Boolean getShowJobsAtLogin() {
        return showJobsAtLogin;
    }

    public void setShowJobsAtLogin(Boolean showJobsAtLogin) {
        this.showJobsAtLogin = showJobsAtLogin;
    }

    public String getPriority1() {
        return priority1;
    }

    public void setPriority1(String priority1) {
        this.priority1 = priority1;
    }

    public String getPriority2() {
        return priority2;
    }

    public void setPriority2(String priority2) {
        this.priority2 = priority2;
    }

    public String getPriority3() {
        return priority3;
    }

    public void setPriority3(String priority3) {
        this.priority3 = priority3;
    }

    public String getPriority4() {
        return priority4;
    }

    public void setPriority4(String priority4) {
        this.priority4 = priority4;
    }

    public String getPriority5() {
        return priority5;
    }

    public void setPriority5(String priority5) {
        this.priority5 = priority5;
    }

    public String getPriority6() {
        return priority6;
    }

    public void setPriority6(String priority6) {
        this.priority6 = priority6;
    }

    public Boolean getIsCategorizedSoftExpanded() {
        return isCategorizedSoftExpanded;
    }

    public void setIsCategorizedSoftExpanded(Boolean isCategorizedSoftExpanded) {
        this.isCategorizedSoftExpanded = isCategorizedSoftExpanded;
    }

    public Boolean getIsNotCategorizedSoftExpanded() {
        return isNotCategorizedSoftExpanded;
    }

    public void setIsNotCategorizedSoftExpanded(Boolean isNotCategorizedSoftExpanded) {
        this.isNotCategorizedSoftExpanded = isNotCategorizedSoftExpanded;
    }

    public Boolean getFollowupPrivate() {
        return followupPrivate;
    }

    public void setFollowupPrivate(Boolean followupPrivate) {
        this.followupPrivate = followupPrivate;
    }

    public Boolean getTaskPrivate() {
        return taskPrivate;
    }

    public void setTaskPrivate(Boolean taskPrivate) {
        this.taskPrivate = taskPrivate;
    }

    public Integer getDefaultRequesttypesId() {
        return defaultRequesttypesId;
    }

    public void setDefaultRequesttypesId(Integer defaultRequesttypesId) {
        this.defaultRequesttypesId = defaultRequesttypesId;
    }

    public String getPasswordForgetToken() {
        return passwordForgetToken;
    }

    public void setPasswordForgetToken(String passwordForgetToken) {
        this.passwordForgetToken = passwordForgetToken;
    }

    public Date getPasswordForgetTokenDate() {
        return passwordForgetTokenDate;
    }

    public void setPasswordForgetTokenDate(Date passwordForgetTokenDate) {
        this.passwordForgetTokenDate = passwordForgetTokenDate;
    }

    public String getUserDn() {
        return userDn;
    }

    public void setUserDn(String userDn) {
        this.userDn = userDn;
    }

    public String getRegistrationNumber() {
        return registrationNumber;
    }

    public void setRegistrationNumber(String registrationNumber) {
        this.registrationNumber = registrationNumber;
    }

    public Boolean getShowCountOnTabs() {
        return showCountOnTabs;
    }

    public void setShowCountOnTabs(Boolean showCountOnTabs) {
        this.showCountOnTabs = showCountOnTabs;
    }

    public Integer getRefreshTicketList() {
        return refreshTicketList;
    }

    public void setRefreshTicketList(Integer refreshTicketList) {
        this.refreshTicketList = refreshTicketList;
    }

    public Boolean getSetDefaultTech() {
        return setDefaultTech;
    }

    public void setSetDefaultTech(Boolean setDefaultTech) {
        this.setDefaultTech = setDefaultTech;
    }

    public String getPersonalToken() {
        return personalToken;
    }

    public void setPersonalToken(String personalToken) {
        this.personalToken = personalToken;
    }

    public Date getPersonalTokenDate() {
        return personalTokenDate;
    }

    public void setPersonalTokenDate(Date personalTokenDate) {
        this.personalTokenDate = personalTokenDate;
    }

    public Integer getDisplayCountOnHome() {
        return displayCountOnHome;
    }

    public void setDisplayCountOnHome(Integer displayCountOnHome) {
        this.displayCountOnHome = displayCountOnHome;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof GlpiUsers)) {
            return false;
        }
        GlpiUsers other = (GlpiUsers) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.comfacauca.xmlc2.entidades.glpi.GlpiUsers[ id=" + id + " ]";
    }
    
}
